package cn.beyond.vehicleManagement.service;

import cn.beyond.vehicleManagement.dao.VehicleRepairDao;
import cn.beyond.vehicleManagement.pojo.VehicleRepair;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class VehicleRepairSevice {
        VehicleRepairDao dao=new VehicleRepairDao();

    /**
     * 添加车辆维修记录
     * @return
     */
    public int addVehicleRepair(VehicleRepair vehicleRepair){
        return    dao.addVehicleRepair(vehicleRepair);
    }

    /**
     * 删除车辆维修记录
     * @param obj
     * @param column
     * @return
     */
    public int deleteVehicleRepair(Object obj,String column){
        return dao.deleteVehicleRepair(obj,column);

    }

    /**
     * 修改车辆维修记录
     * @return
     */
    public int update(VehicleRepair vehicleRepair){
        return  dao.update(vehicleRepair);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public VehicleRepair selectVehicleRepairByOne(VehicleRepair vehicleRepair, Map<String, Object> selectmap){
        return dao.selectVehicleRepairByOne(vehicleRepair,selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<VehicleRepair> selectUserByCondition(VehicleRepair vehicleRepair,
                                                     Map<String, Object> selectmap){
        return  dao.selectUserByCondition(vehicleRepair,selectmap);
    }

}
